package com.rtos.model.fileSystem;

import com.rtos.model.disk.Disk;

import java.util.ArrayList;

/**
 * @Author: Redi
 * @Date: 2021/10/17 19:57
 * @Description:
 */
public class ExeFileTest {

    public static void main(String[] args) throws Exception {
        FileUtil fileUtil = FileUtil.getInstance();
        // test create e1.e------------------------->
        String fileOnePath = "e1.e";
        String contextOne = "x=1";
        fileUtil.createFile(fileOnePath, contextOne);
        ArrayList<String> exeFilesList = fileUtil.getExeFiles();
        checkArrayList(exeFilesList, "root");

        System.out.println(fileUtil.getFileContent("/e1.e"));

    }

    private static void checkArrayList(ArrayList arrayList, String path){
        System.out.println("<<<<<<<<<<<<<checkArrayList<<< start <<<<<<<");
        System.out.println("now we are in the path:"+path);
        System.out.println("arrayList.length:"+arrayList.size());
        for (Object o : arrayList){
            System.out.println(o);
        }
        System.out.println(">>>>>>>>>>>>>checkArrayList>>>>> end >>>>>");
    }
}
